<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{margin: 0;padding: 0;}
        .nav{
            overflow: hidden;
            line-height: 50px;
            background: pink;
        }
        a{
            display: block;
            float: left;
            text-decoration: none;
            width: 100px;
            text-align: center;
            color: white;
        }
        a:hover{
            background: #fff;
            color:palegreen;
        }
    </style>
</head>
<body>
    <div class="nav">
        <a href="#">手机</a>
        <a href="#">平板</a>
        <a href="#">电脑</a>
    </div>
</body>
</html>